package nl.utwente.fmt.vertalerbouw.tarrh.encoder;

import org.objectweb.asm.Label;

/**
 * Class to hold all labels related to the try catch statement in the encoder.
 */
public class TryCatchLabels {
	private final Label afterTryLabel = new Label();
	private final Label beforeCatchLabel = new Label();
	private final Label beforeTryLabel = new Label();
	private final Label endLabel = new Label();

	/**
	 * Get the label pointing to the end of the try part of the try catch
	 * statement.
	 * 
	 * @return the label after try.
	 */
	public Label getAfterTryLabel() {
		return afterTryLabel;
	}

	/**
	 * Get the label pointing to the begin of the catch part of the try catch
	 * statement.
	 * 
	 * @return the label before catch.
	 */
	public Label getBeforeCatchLabel() {
		return beforeCatchLabel;
	}

	/**
	 * Get the label pointing to the begin of the try part of the try catch
	 * statement.
	 * 
	 * @return the label before try.
	 */
	public Label getBeforeTryLabel() {
		return beforeTryLabel;
	}

	/**
	 * Get the label pointing to the end of the try catch statement.
	 * 
	 * @return the end label.
	 */
	public Label getEndLabel() {
		return endLabel;
	}
}
